FROM node:20-slim

WORKDIR /app

COPY package*.json ./

# 配置 npm 源并安装依赖
RUN npm config set registry https://registry.npmmirror.com && \
    npm install && \
    npm cache clean --force

COPY . .

EXPOSE 3000

CMD ["node", "server.js"] 